package Login;

import com.opensymphony.xwork2.ActionSupport;

/**
 * User: Red_Code
 * Date: 12-9-25
 * Time: 上午11:13
 */
public class login extends ActionSupport {
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String execute() throws Exception {
        return checkLogin();
    }

    String checkLogin()
    {
        if("yjz".equalsIgnoreCase(username) && "123".equalsIgnoreCase(pwd))
        {
            return SUCCESS;
        }
        else
            return LOGIN;
    }

    private String username;
    private String pwd;
}
